package com.grf.hadoop.practice;

import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

public class WordCountMapper extends Mapper<Text, Text, Text, IntWritable> {

    private IntWritable v = new IntWritable(1);
    //private Text k = new Text();

    @Override
    protected void map(Text key, Text value, Context context)
            throws IOException, InterruptedException {
        //String line = value.toString();
        //String[] words = line.split(" ");
        //k.set(words[0]);

        context.write(key, v);
    }
}
